<uib-tabset ng-if="sourceData.currentIndex!=null"> 
<uib-tab> 
<uib-tab-heading> <i class="glyphicon glyphicon-fire"></i> 物料</uib-tab-heading> <br>

<form class="form-horizontal">
	<div class="row">
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">物料编码</label>
				<div class="col-sm-8">
					<div class="input-group">
						<input type="text" class="form-control" data-ng-model="sourceData.rows[sourceData.currentIndex].itemNo.value" data-ng-disabled="true" /> 
						<span class="input-group-btn">
							<button class="btn btn-default btn-sm" data-ng-disabled="sourceData.readonly();" data-ng-click="itemClick()">
								<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
							</button>
						</span>
					</div>
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">物料名称</label>
				<div class="col-sm-8">
					<input type="text" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].itemName.value"
						data-ng-disabled="true" />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">规格</label>
				<div class="col-sm-8">
					<input type="text" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].itemProperty.value"
						data-ng-disabled="true" />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">件数</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].pieceQuantity.value"
						name="pieceQuantity" data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>
	</div>
	<div class="row" ng-hide="sourceData.rows[sourceData.currentIndex].billType.value=='GYZY'">
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">仓库代码</label>
				<div class="col-sm-8">
					<input type="text" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].storageNo.value"
						name="storageNo" disabled required />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">仓库</label>
				<div class="col-sm-8">
					<input type="text" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].storageName.value"
						name="storageName" disabled />
				</div>
			</div>
		</div>

		<div class="col-sm-6">
			<div class="form-group form-group-sm">
				<label class="col-sm-2 control-label">库存地</label>
				<div class="col-sm-10">
					<div class="input-group">
						<input type="text" class="form-control"
							data-ng-model="sourceData.rows[sourceData.currentIndex].floorNo.value"
							data-ng-readonly="true" /> 
							<span class="input-group-btn">
							<button class="btn btn-default btn-sm"
								data-ng-disabled="sourceData.readonly();"
								data-ng-click="toClick()">
								<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
							</button>
						</span>
					</div>
				</div>
			</div>
		</div>

	</div>
</form>

</uib-tab>


<uib-tab select="alertMe()"> <uib-tab-heading> 单位 </uib-tab-heading> <br>

<form class="form-horizontal">
	<div class="row">
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">计量单位</label>
				<div class="col-sm-8">
					<input type="text" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].unitName.value"
						name="unitName" disabled />
				</div>
			</div>
		</div>

		<!-- 
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">数量</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].itemAmount.value"
						name="itemAmount" data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">入库数量</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].accountQuantityI.value"
						name="accountQuantityI" data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">出库数量</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].accountQuantityO.value"
						name="accountQuantityO" data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>
		 -->
	</div>
</form>
</uib-tab> 
<uib-tab ng-if="sourceData.rows[sourceData.currentIndex].billType.value=='CBKZ'"> <uib-tab-heading> 成本</uib-tab-heading> <br>

<form class="form-horizontal">
	<div class="row">
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">单位材料</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].materialAmountPer.value"
						data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">单位人工</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].workingAmountPer.value"
						data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">单位制费</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].manufactAmountPer.value"
						data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">单位加工</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].processAmountPer.value"
						data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">材料成本</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].materialAmount.value"
						data-ng-readonly="true" />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">人工成本</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].workingAmount.value"
						data-ng-readonly="true" />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">制造费用</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].manufactAmount.value"
						data-ng-readonly="true" />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">加工费用</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].processAmount.value"
						data-ng-readonly="true" />
				</div>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">单位成本</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].costingAmountPer.value"
						data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">成本合计</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].costingAmount.value"
						data-ng-readonly="true" />
				</div>
			</div>
		</div>
	</div>
</form>

</uib-tab> 
<!-- 
<uib-tab ng-if="sourceData.rows[sourceData.currentIndex].billType.value=='CGRK' 
	|| sourceData.rows[sourceData.currentIndex].billType.value=='XSRK'
	|| sourceData.rows[sourceData.currentIndex].billType.value=='SCRK'
	|| sourceData.rows[sourceData.currentIndex].billType.value=='WWRK'
	|| sourceData.rows[sourceData.currentIndex].billType.value=='GYZY'
	|| sourceData.rows[sourceData.currentIndex].billType.value=='GYRK'
	" > 
 -->
 
<uib-tab>
<uib-tab-heading> <i class="glyphicon glyphicon-flash"></i> 验收</uib-tab-heading> <br>

<form class="form-horizontal">
	<div class="row">
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">到货数量</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].arriveAmount.value"
						data-ng-disabled="sourceData.readonly();" />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">验收数量</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].itemAmount.value"
						data-ng-disabled="sourceData.readonly();" />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">检验方式</label>
				<div class="col-sm-8">
					<input type="text" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].qualityTypeLabel.value"
						data-ng-readonly="true" />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">检验结果</label>
				<div class="col-sm-8">
					<input type="text" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].qualityStatusLabel.value"
						data-ng-readonly="true" />
				</div>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">报废数量</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].wasterAmount.value"
						 data-ng-disabled="sourceData.readonly();"  />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">损耗数量</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].ullageAmount.value"
						 data-ng-disabled="sourceData.readonly();"  />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">验退数量</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].arriveAmountBack.value"
						 data-ng-disabled="sourceData.readonly();"  />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">计价数量</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].priceAmount.value"
						data-ng-readonly="true" />
				</div>
			</div>
		</div>
	</div>
</form>

</uib-tab> 
<uib-tab  ng-if="sourceData.rows[sourceData.currentIndex].batchNo.value!='********************'"> <uib-tab-heading> <span class="glyphicon glyphicon-ok"></span> 批号管理 </uib-tab-heading> <br>

<form class="form-horizontal">
	<div class="row">
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">生产批号</label>
				<div class="col-sm-8">
					<div class="input-group">
					<input type="text" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].batchNo.value"
						data-ng-readonly="true" 
						data-ng-disabled="sourceData.rows[sourceData.currentIndex].batchNo.value=='********************'"
						/>
						<span class="input-group-btn">
							<button class="btn btn-default btn-sm"
								data-ng-disabled="sourceData.readonly();"
								data-ng-click="triggerBatchNoClick($event)">
								<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
							</button>
						</span>
					</div>
				</div>
			</div>
		</div>
		<div class="col-sm-6">
			<div class="form-group form-group-sm">
				<label class="col-sm-2 control-label">批号说明</label>
				<div class="col-sm-10">
						<input type="text" class="form-control"
							data-ng-model="sourceData.rows[sourceData.currentIndex].batchDescribe.value"
							data-ng-readonly="sourceData.readonly();" 
							data-ng-disabled="sourceData.rows[sourceData.currentIndex].batchNo.value=='********************'"
							/> 
				</div>
			</div>
		</div>
	</div>

	<div class="row">
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">品牌</label>
				<div class="col-sm-8">
					<input type="text" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].brandLabel.value"
						name="brandLabel" data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">产地</label>
				<div class="col-sm-8">
					<input type="text" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].placeOrigin.value"
						name="placeOrigin" data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>

		<div class="col-sm-6">
			<div class="form-group form-group-sm">
				<label class="col-sm-2 control-label">制造商</label>
				<div class="col-sm-10">
					<input type="text" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].manufacturer.value"
						data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>

	</div>
</form>

</uib-tab> 

<uib-tab ng-if="sourceData.rows[sourceData.currentIndex].qualityPeriod.value==1"> <uib-tab-heading> <span class="glyphicon glyphicon-ok"></span> 保质期 </uib-tab-heading> <br>

<form class="form-horizontal">
									<div class="row">
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">生产日期</label>
												<div class="col-sm-8">
														<input type="text" class="form-control" simple-datepicker orientation="top auto"
															data-ng-model="sourceData.rows[sourceData.currentIndex].produceDate.value"
															data-ng-disabled="sourceData.readonly();"/>
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">有效日期</label>
												<div class="col-sm-8">
														<input type="text" class="form-control" simple-datepicker orientation="top auto"
															data-ng-model="sourceData.rows[sourceData.currentIndex].validDate.value"
															data-ng-disabled="sourceData.readonly();"/>
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">复检日期</label>
												<div class="col-sm-8">
														<input type="text" class="form-control" simple-datepicker orientation="top auto"
															data-ng-model="sourceData.rows[sourceData.currentIndex].checkoutAgainDate.value"
															data-ng-disabled="sourceData.readonly();"/>
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">有效天数</label>
												<div class="col-sm-8">
													<input type="number" class="form-control"
														data-ng-model="sourceData.rows[sourceData.currentIndex].validDays.value"
														data-ng-readonly="true" />
												</div>
											</div>
										</div>
									</div>
	<div class="row">
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">复检天数</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].checkoutAgainDays.value"
						data-ng-readonly="true" />
				</div>
			</div>
		</div>

	</div>
</form>

</uib-tab> 

<uib-tab> 

<uib-tab-heading> <span class="glyphicon glyphicon-ok"></span> 序号管理</uib-tab-heading> <br>

<form class="form-horizontal">
	<div class="row">
		<div class="col-sm-12">
			<div class="form-group">
				<label class="col-sm-1 control-label">序号列表</label>
				<div class="col-sm-11">
					<modal-edit target-data="sourceData" target-value="storeNo" row-index="sourceData.currentIndex"></modal-edit>				
				</div>
			</div>
		</div>
	</div>
</form>

</uib-tab>

<uib-tab> <uib-tab-heading> 重量/尺寸/运费 </uib-tab-heading> <br>

<form class="form-horizontal">
	<div class="row">

		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">重量KG</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].itemWeight.value"
						name="itemWeight" data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">包装重量</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].orderWeight.value"
						name="orderWeight" data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">体积M3</label>
				<div class="col-sm-8">
					<input type="text" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].itemSize.value"
						name="itemSize" data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>
		<div class="col-sm-3">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">包装体积</label>
				<div class="col-sm-8">
					<input type="text" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].orderSize.value"
						name="orderSize" data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>

	</div>
	<div class="row">
		<div class="col-sm-3" ng-hide="true">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">运费</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].freightAmount.value"
						name="freightAmount" data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>
		<div class="col-sm-3" ng-hide="true">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">其他费用</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].apportionAmount.value"
						name="apportionAmount" data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>
		<div class="col-sm-3" ng-show="sourceData.rows[sourceData.currentIndex].billType.value=='CGRK' || sourceData.rows[sourceData.currentIndex].billType.value=='CGCK'">
			<div class="form-group form-group-sm">
				<label class="col-sm-4 control-label">扣款金额</label>
				<div class="col-sm-8">
					<input type="number" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].deductAmount.value"
						name="deductAmount" data-ng-readonly="sourceData.readonly();" />
				</div>
			</div>
		</div>
	</div>
</form>

</uib-tab>
<uib-tab> <uib-tab-heading> 备注 </uib-tab-heading> <br>

<form class="form-horizontal">

	<div class="row">
		<div class="col-sm-12">

			<div class="form-group">
				<label class="col-sm-1 control-label">备注</label>
				<div class="col-sm-11">
					<textarea rows="3" class="form-control"
						data-ng-model="sourceData.rows[sourceData.currentIndex].comments.value"
						data-ng-readonly="sourceData.readonly();">
					</textarea>
				</div>
			</div>

		</div>
	</div>
</form>
</uib-tab> 
</uib-tabset>
<br>
<br>